.text-box {
  perspective: 800rpx;
  position: fixed;
  z-index: 9999;
  top: 50%;
  left: 50%;
  transform-style: preserve-3d;
  .test {
    transform-style: preserve-3d;
    .item {
      width: 50rpx;
      height: 50rpx;
      background-color: #333;
      transition: all 0.02s;
    }
  }
}

.page-container {
  overflow: hidden;
}

.content,
.intro .poster-text text {
  opacity: 0;
  transform: translateY(24rpx);
}
.intro .type-container {
  opacity: 0;
  transform: translateY(50%);
}
.center-box .type {
  width: 200%;
  opacity: 0;
  transform: translateX(-25%);
}

.active {
  .intro {
    .text-1 {
      animation: faeInToUp 0.35s ease forwards;
    }
    .text-2 {
      animation: faeInToUp 0.35s 0.2s ease forwards;
    }
  }
  .intro .type-container {
    animation: toUp 0.35s 0.35s ease forwards;
  }
  .content {
    animation: faeInToUp 0.35s 0.45s ease forwards;
  }
  .center-box .type {
    animation: enterFromBothSides 0.35s 0s ease forwards;
  }
}

.intro {
  height: auto;
  position: relative;
  box-sizing: border-box;
  background: linear-gradient(180deg, #3e88ff 0%, #ffffff 50%);
  z-index: 1;
  overflow: hidden;
  .poster-bg {
    image {
      width: 100%;
      height: 704rpx;
      display: block;
    }
  }

  .poster-text {
    color: #ffffff;
    position: absolute;
    top: 255rpx;
    left: 44rpx;
    width: auto;
    display: inline;

    text {
      display: block;
      &.text-1 {
        font-size: 40rpx;
        line-height: 48rpx;
        font-weight: 500;
      }

      &.text-2 {
        line-height: 28rpx;
        font-size: 24rpx;
        margin-top: 14rpx;
      }
    }
  }

  .type-container {
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    overflow: hidden;
    z-index: 1;
  }
}
.type-box {
  box-sizing: border-box;
  padding: 0 20rpx;
  width: 100%;
  height: auto;

  .show-driving-school {
    height: 140rpx;
    border-radius: 24rpx 24rpx 0rpx 0rpx;
    align-items: center;
    justify-content: space-between;
  }
}
.center-box {
  box-sizing: border-box;
  padding: 0 20rpx;
  position: relative;
  margin-top: 0;
  z-index: 10;
  .type {
    height: 170rpx;
    display: flex;
    justify-content: space-between;
    background-color: #ffffff;
    border-radius: 0rpx 0rpx 24rpx 24rpx;
    box-sizing: border-box;
    padding: 0;

    .type-item {
      width: auto;
      text-align: center;
      padding: 30rpx 42rpx 0 42rpx;

      &.active {
        image {
          // transform: scale(1.1);
          animation: activeScale 0.35s ease forwards;
        }
      }

      image {
        display: block;
        width: 60rpx;
        height: 60rpx;
        margin: auto;
        position: relative;

        &::before {
          content: "";
          display: block;
          position: absolute;
        }

        &::after {
          content: "";
          display: block;
          position: absolute;
        }

        &.image-0 {
          &::before {
            width: 9rpx;
            height: 9rpx;
            background-color: #ffffff;
            border-radius: 50%;
            top: 32rpx;
            left: 8rpx;
            z-index: 1;
          }
        }

        &.image-3 {
          &::before,
          &::after {
            width: 6rpx;
            height: 11rpx;
            background-color: rgb(255, 255, 255);
            border-radius: 2rpx;
            top: 25rpx;
            z-index: 1;
          }

          &::before {
            left: 26rpx;
          }

          &::after {
            left: 35rpx;
          }
        }
      }

      text {
        text-align: center;
        font-size: 32rpx;
        margin-top: 16rpx;
        color: #999999;
        transform: all 0.35s;
      }
    }
  }
}

.top-info {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 999;
}
.top-container {
  height: 100%;
  position: relative;

  .top-box {
    height: 100%;
    display: flex;
    align-items: center;
    position: absolute;
    top: 0;
    width: auto;
  }

  .header-image {
    width: 28px;
    height: 28px;
    margin-right: 8px;

    image {
      display: block;
      width: 100%;
      height: 100%;
      border-radius: 50%;
    }
  }

  .addr {
    height: 100%;
    display: flex;
    align-items: center;
    color: #ffffff;

    text {
      font-size: 16px;
      overflow: hidden;
      white-space: nowrap;
      text-overflow: ellipsis;
    }

    image {
      width: 12px;
      height: 12px;
      margin-left: 8rpx;
      transform: rotate(90deg);
      &.active {
        transform: rotate(-90deg);
      }
    }
  }
}
.show-driving-school {
  display: flex;
  box-sizing: border-box;
  padding: 0 24rpx;
  align-items: center;

  .logo {
    width: 190rpx;
    height: 50rpx;

    image {
      display: block;
      width: 100%;
      height: 100%;
    }
  }

  .info {
    width: calc(100% - 190rpx);
    display: flex;
    align-items: center;

    .info-left {
      width: calc(100% - 24rpx);

      box-sizing: border-box;
      padding: 0 16rpx 0 30rpx;

      .name {
        display: flex;
        align-items: flex-start;
        font-size: 32rpx;
        line-height: 32rpx;
        color: #ffffff;

        text {
          max-width: calc(100% - 32rpx - 8rpx);
        }

        image {
          width: 32rpx;
          height: 32rpx;
          margin: 0 0 0 8rpx;
        }
      }

      .certification {
        font-size: 24rpx;
        color: #ffffff;
        line-height: 24rpx;
        margin-top: 16rpx;
      }
    }

    .more {
      width: 24rpx;
      height: 24rpx;
      position: relative;

      image {
        width: 100%;
        height: 100%;
        display: block;
      }
    }
  }
}

.content {
  box-sizing: border-box;
  padding: 24rpx 20rpx 0rpx 20rpx;
  position: relative;
  &.height {
    height: calc(100vh - 704rpx - 170rpx + 46rpx);
    overflow: hidden;
    min-height: 460rpx;
  }
  .enter {
    animation: enter 0.35s;
  }
  .leave {
    animation: leave 0.35s;
  }
}

.addr-container {
  box-sizing: border-box;
  padding: 0 0 0 24rpx;

  .region,
  .addrres {
    display: flex;
    align-items: center;
  }

  .region {
    font-size: 32rpx;
    color: #000000;
    line-height: 32rpx;
    margin-top: 24rpx;
    font-weight: 500;

    image {
      width: 24rpx;
      height: 24rpx;
      margin-left: 8rpx;
    }
  }

  .addrres {
    // margin-top: 24rpx;
    line-height: 28rpx;
    font-size: 28rpx;
    color: #999999;

    image {
      width: 28rpx;
      height: 28rpx;
      margin-right: 4rpx;
    }

    button {
      background-color: transparent;
      padding: 0;
      margin: 0;
      font-size: 24rpx;
      width: auto;
      font-weight: 400;
    }
  }
}

.service {
  box-sizing: border-box;
}

.question {
  padding-bottom: 150rpx;
}

.btn-box {
  box-sizing: border-box;
  padding: 24rpx 24rpx 24rpx 24rpx;
  position: fixed;
  bottom: 68rpx;
  left: 0;
  width: 100%;
  padding-bottom: env(safe-area-inset-bottom);
  z-index: 20;
  // background: linear-gradient(180deg, #ffffff44 0%, #f8f8f8 50%);
 
  &.leave {
    animation: bottomLeave 0.35s 0s ease forwards;
  }
  &.enter {
    animation: bottomEnter 0.35s 0s ease forwards;
  }
 

  &.show {
    display: block;
  }

  .btn {
    height: 90rpx;
    width: 90%;
    border-radius: 45rpx;
    background-color: var(--color-theme);
    color: #ffffff;
    font-size: 36rpx;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: auto;
    opacity: 0;
    transform: translateY(200rpx) scale(0.35);
    &.active {
      animation: bottomEnter 0.35s 0.3s ease forwards;
    }
    &.leave {
      // animation: bottomLeave 0.5s ease forwards;
    }
  }
}

@keyframes bottomLeave {
  0% {
    opacity: 1;
    transform: translateY(0rpx) scale(1);
  }

  100% {
    opacity: 0;
    transform: translateY(200rpx) scale(0.35);
  }
}

@keyframes bottomEnter {
  0% {
    opacity: 0;
    transform: translateY(200rpx) scale(0.35);
  }

  100% {
    opacity: 1;
    transform: translateY(0rpx) scale(1);
  }
}

@keyframes flicker {
  0% {
    opacity: 0;
    transform: translateY(200rpx) scale(0.35);
  }

  100% {
    opacity: 1;
    transform: translateY(0rpx) scale(1);
  }
}

@keyframes blink {
  0% {
    transform: scaleY(1);
  }
  100% {
    transform: scaleY(0.2);
  }
}

@keyframes activeScale {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.2);
  }
  100% {
    transform: scale(1);
  }
}

.loading {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #666666;
  font-size: 26rpx;
  background-color: rgba(0, 0, 0, 0.75);

  .loading-box {
    margin-top: 30%;
  }
}

.sticky-header-text {
  background-color: #f8f8f8;
  box-sizing: border-box;
  padding: 24rpx 24rpx 24rpx 48rpx;
  color: #333333;
  font-weight: 500;
  &.enter {
    animation: enter 0.35s;
  }
}
.site-item {
  box-sizing: border-box;
  padding: 0 24rpx;
  &.enter {
    animation: enter 0.35s;
  }
}
.site-loading {
  height: 40vh;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #999;
}

.nearest {
  margin-top: 24rpx;
  text {
    color: #666;
  }
}

.bottom-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24rpx;
  color: #666;
  height: 160rpx;
  &.active {
    animation: height 0.35s ease forwards;
  }
}

@keyframes height {
  0% {
    transform: scaleY(0);
  }
  100% {
    transform: scaleY(1);
  }
}
